#!/bin/bash

pid=`pgrep wl-screenrec -d -D`
status=$?

if [ $status != 0 ]
then
wl-screenrec --audio --audio-device alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor -o HDMI-A-1 -f ~/ScreenNonRecord/$(date +recording_%Y-%m-%d-%H%M%S.mkv);
else
  pkill --signal SIGINT wl-screenrec
fi
